package com.genreate.util.xinyuan.shop;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import com.genreate.util.xinyuan.HaiwaiOssUtils;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 * 应用程序使用情况
 *
 * @author LYS
 * @date 2025-05-27
 */
public class AppUtils {
    public static void main(String[] args) throws Exception {
        shopBackfillLogisticsData();
    }

    /**
     * 回填物流单-详细导入模板
     *
     * @throws Exception 例外
     */
    public static void shopBackfillLogisticsData() throws Exception {
        //本地路径
        String zhFilePath = "D:\\慧信顺\\鑫源\\商城\\导入模板\\回填物流单-详细导入模板.xlsx";

        //中文 oss路径
        String zhOssPath = "importTemplate/shop/回填物流单-详细导入模板.xlsx";
        String zhOssPathUpload = AppOssUtils.fileUpload(zhFilePath, zhOssPath, URLEncoder.encode(FileUtil.getName(zhOssPath), "UTF-8"));
        System.out.println(StrUtil.format("{}",zhOssPathUpload));
    }
}
